﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace guest_management_in_a_hotel
{
    public partial class BaoCaoKH : Form
    {
        SqlConnection conn;
        SqlDataAdapter da;
        DataSet ds;

        public BaoCaoKH()
        {
            InitializeComponent();
        }

        private void BaoCaoKH_Load(object sender, EventArgs e)
        {
            conn = Connect.getConnection();
            conn.Open();
            String str = "select * from TblGuests";
            da = new SqlDataAdapter(str, conn);
            ds = new DataSet();
            da.Fill(ds, "phong");
            BaoCaoKHRP rpt = new BaoCaoKHRP();
            rpt.SetDataSource(ds);
            CRBaocaoKH.ReportSource = rpt;
            CRBaocaoKH.Show();
            
        }
    }
}
